3.10 逻辑运算符2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript">
var a=prompt();
var b
var c
b=a=="" //true
c=a!=="" //false
document.write(b,"<br>")
document.write(c,"<br>")
// false,0,""均为假
if (false|| 0 || "") {
document.write("真");
}else{
document.write("假");
};
</script>
</head>
<body>
</body>
</html>
返回:
False
True
假